package com.sky.mapper;

import com.sky.annotation.AutoFill;
import com.sky.dto.CategoryDTO;
import com.sky.entity.Category;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;

@Mapper
public interface CategoryMapper {

    //添加分类
    @AutoFill
    void add(Category category);

    //分页查询
    List<Category> list(CategoryDTO categoryDTO);

    //删除
    @Delete("delete from category where id=#{id}")
    void deleteById(Long id);

    //修改
    @AutoFill
    void update(Category category);
}
